//
//  EPXMLService.m
//  iphone.mobileoa
//
//  Created by 李亚春 on 13-5-24.
//  Copyright (c) 2013年 Epoint. All rights reserved.
//

#import "EPXMLService.h"
#import "StringUtil.h"
#import "TKAlertCenter.h"

@implementation EPXMLService

+(BOOL)validateXML:(NSString *)xml
{
    NSString *ReturnInfo = [StringUtil getXMLFormatedAttribute:xml :@"ReturnInfo"];
    NSString *Status = [StringUtil getXMLFormatedAttribute:xml :@"Status"];
    if ([Status.lowercaseString isEqualToString:@"true"]) {
        return YES;
    }
    else
    {
        [[TKAlertCenter defaultCenter] postAlertWithMessage:ReturnInfo];
        return NO;
    }
}

+(BOOL)validateXML_NOToast:(NSString *)xml
{
    NSString *Status = [StringUtil getXMLFormatedAttribute:xml :@"Status"];
    if ([Status.lowercaseString isEqualToString:@"true"]) {
        return YES;
    }
    else
    {
        return NO;
    }
}

@end
